<!DOCTYPE html>
<!-- saved from url=(0065)./coordinatesBasedAutomation.html -->
<html lang="zh-CN" data-theme="light" class=" ">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="generator" content="VuePress 2.0.0-beta.51" />
    <meta name="theme" content="VuePress Theme Hope" />
    <meta property="og:url" content="ocr.html">
    <meta property="og:site_name" content="Auto.js Pro文档">
    <meta property="og:title" content="ocr - 文字识别">
    <meta property="og:type" content="article">
    <meta property="og:updated_time" content="2022-10-22T07:36:15.000Z">
    <meta property="og:locale" content="zh-CN">
    <meta property="og:locale:alternate" content="en-US">
    <meta property="article:modified_time" content="2022-10-22T07:36:15.000Z">
    <link rel="alternate" hreflang="en-us" href="./docs/en/zh/v8/ocr.html">
    <link rel="icon" href="./docs/favicon.ico">
    <link rel="manifest" href="./docs/manifest.webmanifest" crossorigin="use-credentials">
    <meta name="theme-color" content="#46bd87">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
    <title>ocr - 文字识别 | Auto.js Pro文档</title>
    <meta name="description" content="支持Node.js的自动化工作流JavaScript IDE">
    <style>
        :root {
            --bg-color: #fff;
        }

        html[data-theme="dark"] {
            --bg-color: #1d2025;
        }

        html,
        body {
            background-color: var(--bg-color);
        }
    </style>
    <script>
        const userMode = localStorage.getItem("vuepress-theme-hope-scheme");
        const systemDarkMode =
            window.matchMedia &&
            window.matchMedia("(prefers-color-scheme: dark)").matches;

        if (userMode === "dark" || (userMode !== "light" && systemDarkMode)) {
            document.querySelector("html").setAttribute("data-theme", "dark");
        }
    </script>
    <link rel="stylesheet" href="../../assets/style.ae9cb182.css">
    <link rel="modulepreload" href="../../assets/app.6aa2b576.js">
    <link rel="modulepreload" href="../../assets/app.html.004a89b7.js">
    <link rel="modulepreload" href="../../assets/_plugin-vue_export-helper.cdc0426e.js">
    <link rel="modulepreload" href="../../assets/app.html.79d7bc17.js">
</head>

<body>
    <!-- Copyright � 2008. Spidersoft Ltd -->
    <style>
        A.applink:hover {
            border: 2px dotted #DCE6F4;
            padding: 2px;
            background-color: #ffff00;
            color: green;
            text-decoration: none
        }

        A.applink {
            border: 2px dotted #DCE6F4;
            padding: 2px;
            color: #2F5BFF;
            background: transparent;
            text-decoration: none
        }

        A.info {
            color: #2F5BFF;
            background: transparent;
            text-decoration: none
        }

        A.info:hover {
            color: green;
            background: transparent;
            text-decoration: underline
        }
    </style>


    <div id="app"><!--[--><!--[--><!--[--><span tabindex="-1"></span><a href="#main-content"
            class="skip-link sr-only">Skip to content</a><!--]-->
        <div class="theme-container has-toc"><!--[--><!--[-->
            <header class="navbar">
                <div class="navbar-left"><button class="toggle-sidebar-button" title="Toggle Sidebar"><span
                            class="icon"></span></button><!----><a href="../../docs.html" class="brand"><img
                            class="logo" src="../../logo.png" alt="Auto.js Pro文档"><!----><span
                            class="site-name hide-in-pad">Auto.js
                            Pro文档</span></a><!----></div>
                <div class="navbar-center"><!---->
                    <nav class="nav-links">
                        <div class="nav-item hide-in-mobile"><a href="../../docs.html" class="nav-link"
                                aria-label="Auto.js Pro"><span class="icon iconfont icon-home"></span>Auto.js
                                Pro<!----></a></div>
                        <div class="nav-item hide-in-mobile"><a href="../guide/guide.html" class="nav-link"
                                aria-label="指南"><span class="icon iconfont icon-creative"></span>指南<!----></a></div>
                        <div class="nav-item hide-in-mobile"><a href="v8.html" class="nav-link active"
                                aria-label="第一代API文档"><span class="icon iconfont icon-note"></span>第一代API文档<!----></a>
                        </div>
                        <div class="nav-item hide-in-mobile"><a href="../v9/v9.html" class="nav-link"
                                aria-label="第二代API文档"><span class="icon iconfont icon-note"></span>第二代API文档<!----></a>
                        </div>
                        <div class="nav-item hide-in-mobile">
                            <div class="dropdown-wrapper"><button class="dropdown-title" type="button"
                                    aria-label="官网与相关链接"><span class="title"><span
                                            class="icon iconfont icon-discover"></span>官网与相关链接</span><span
                                        class="arrow"></span>
                                    <ul class="nav-dropdown">
                                        <li class="dropdown-item"><a href="../../../pro.autojs.html"
                                                rel="noopener noreferrer" target="_blank" aria-label="官网与软件下载"
                                                class="nav-link"><!---->官网与软件下载<span><svg class="external-link-icon"
                                                        xmlns="http://www.w3.org/2000/svg" aria-hidden="true"
                                                        focusable="false" x="0px" y="0px" viewBox="0 0 100 100"
                                                        width="15" height="15">
                                                        <path fill="currentColor"
                                                            d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                                        </path>
                                                        <polygon fill="currentColor"
                                                            points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                                        </polygon>
                                                    </svg><span class="external-link-icon-sr-only">open in new
                                                        window</span></span><!----></a>
                                        </li>
                                        <li class="dropdown-item"><a href="https://blog.autojs.org/"
                                                rel="noopener noreferrer" target="_blank" aria-label="官方博客"
                                                class="nav-link"><!---->官方博客<span><svg class="external-link-icon"
                                                        xmlns="http://www.w3.org/2000/svg" aria-hidden="true"
                                                        focusable="false" x="0px" y="0px" viewBox="0 0 100 100"
                                                        width="15" height="15">
                                                        <path fill="currentColor"
                                                            d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                                        </path>
                                                        <polygon fill="currentColor"
                                                            points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                                        </polygon>
                                                    </svg><span class="external-link-icon-sr-only">open in new
                                                        window</span></span><!----></a>
                                        </li>
                                        <li class="dropdown-item"><a href="https://pd.qq.com/s/gosos5"
                                                rel="noopener noreferrer" target="_blank" aria-label="官方频道"
                                                class="nav-link"><!---->官方频道<span><svg class="external-link-icon"
                                                        xmlns="http://www.w3.org/2000/svg" aria-hidden="true"
                                                        focusable="false" x="0px" y="0px" viewBox="0 0 100 100"
                                                        width="15" height="15">
                                                        <path fill="currentColor"
                                                            d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                                        </path>
                                                        <polygon fill="currentColor"
                                                            points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                                        </polygon>
                                                    </svg><span class="external-link-icon-sr-only">open in new
                                                        window</span></span><!----></a>
                                        </li>
                                    </ul>
                                </button></div>
                        </div>
                    </nav><!---->
                </div>
                <div class="navbar-right"><!---->
                    <div class="nav-item">
                        <div class="dropdown-wrapper i18n-dropdown"><button class="dropdown-title" type="button"
                                aria-label="选择语言"><!--[--><svg xmlns="http://www.w3.org/2000/svg" class="icon i18n-icon"
                                    viewBox="0 0 1024 1024" fill="currentColor" aria-label="i18n icon"
                                    style="width:1rem;height:1rem;vertical-align:middle;">
                                    <path
                                        d="M379.392 460.8 494.08 575.488l-42.496 102.4L307.2 532.48 138.24 701.44l-71.68-72.704L234.496 460.8l-45.056-45.056c-27.136-27.136-51.2-66.56-66.56-108.544h112.64c7.68 14.336 16.896 27.136 26.112 35.84l45.568 46.08 45.056-45.056C382.976 312.32 409.6 247.808 409.6 204.8H0V102.4h256V0h102.4v102.4h256v102.4H512c0 70.144-37.888 161.28-87.04 210.944L378.88 460.8zM576 870.4 512 1024H409.6l256-614.4H768l256 614.4H921.6l-64-153.6H576zM618.496 768h196.608L716.8 532.48 618.496 768z">
                                    </path>
                                </svg><!--]--><span class="arrow"></span>
                                <ul class="nav-dropdown">
                                    <li class="dropdown-item"><a href="https://pro.autojs.org/docs/en/" class="nav-link"
                                            aria-label="English"><!---->English<!----></a></li>
                                    <li class="dropdown-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html"
                                            class="router-link-active router-link-exact-active nav-link active"
                                            aria-label="简体中文"><!---->简体中文<!----></a></li>
                                </ul>
                            </button></div>
                    </div><!---->
                    <div class="nav-item hide-in-mobile"><button id="appearance-switch"><svg
                                xmlns="http://www.w3.org/2000/svg" class="icon auto-icon" viewBox="0 0 1024 1024"
                                fill="currentColor" aria-label="auto icon" style="display:block;">
                                <path
                                    d="M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm0-840c-198.78 0-360 161.22-360 360 0 198.84 161.22 360 360 360s360-161.16 360-360c0-198.78-161.22-360-360-360zm0 660V212c165.72 0 300 134.34 300 300 0 165.72-134.28 300-300 300z">
                                </path>
                            </svg><svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" viewBox="0 0 1024 1024"
                                fill="currentColor" aria-label="dark icon" style="display:none;">
                                <path
                                    d="M524.8 938.667h-4.267a439.893 439.893 0 0 1-313.173-134.4 446.293 446.293 0 0 1-11.093-597.334A432.213 432.213 0 0 1 366.933 90.027a42.667 42.667 0 0 1 45.227 9.386 42.667 42.667 0 0 1 10.24 42.667 358.4 358.4 0 0 0 82.773 375.893 361.387 361.387 0 0 0 376.747 82.774 42.667 42.667 0 0 1 54.187 55.04 433.493 433.493 0 0 1-99.84 154.88 438.613 438.613 0 0 1-311.467 128z">
                                </path>
                            </svg><svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon"
                                viewBox="0 0 1024 1024" fill="currentColor" aria-label="light icon"
                                style="display:none;">
                                <path
                                    d="M952 552h-80a40 40 0 0 1 0-80h80a40 40 0 0 1 0 80zM801.88 280.08a41 41 0 0 1-57.96-57.96l57.96-58a41.04 41.04 0 0 1 58 58l-58 57.96zM512 752a240 240 0 1 1 0-480 240 240 0 0 1 0 480zm0-560a40 40 0 0 1-40-40V72a40 40 0 0 1 80 0v80a40 40 0 0 1-40 40zm-289.88 88.08-58-57.96a41.04 41.04 0 0 1 58-58l57.96 58a41 41 0 0 1-57.96 57.96zM192 512a40 40 0 0 1-40 40H72a40 40 0 0 1 0-80h80a40 40 0 0 1 40 40zm30.12 231.92a41 41 0 0 1 57.96 57.96l-57.96 58a41.04 41.04 0 0 1-58-58l58-57.96zM512 832a40 40 0 0 1 40 40v80a40 40 0 0 1-80 0v-80a40 40 0 0 1 40-40zm289.88-88.08 58 57.96a41.04 41.04 0 0 1-58 58l-57.96-58a41 41 0 0 1 57.96-57.96z">
                                </path>
                            </svg></button></div>
                    <div class="search-box" role="search" data-v-f3875574=""><input value="" aria-label="Search"
                            class="" placeholder="Search" autocomplete="off" spellcheck="false"
                            data-v-f3875574=""><!----></div><!----><button class="toggle-navbar-button"
                        aria-label="Toggle Navbar" aria-expanded="false" aria-controls="nav-screen"><span
                            class="button-container"><span class="button-top"></span><span
                                class="button-middle"></span><span class="button-bottom"></span></span></button>
                </div>
            </header><!----><!--]--><!---->
            <div class="toggle-sidebar-wrapper"><span class="arrow left"></span></div>
            <aside class="sidebar"><!--[--><!----><!--]-->
                <ul class="sidebar-links">
                    <li>
                        <section class="sidebar-group">
                            <p class="sidebar-heading"><!----><span class="title">指南</span><!----></p>
                            <ul class="sidebar-links">
                                <li><!--[--><a href="./" class="nav-link sidebar-link sidebar-page"
                                        aria-label="阅读须知"><!---->阅读须知<!----></a>
                                    <ul class="sidebar-sub-headers"></ul><!--]-->
                                </li>
                            </ul>
                        </section>
                    </li>
                    <li>
                        <section class="sidebar-group">
                            <p class="sidebar-heading active"><!----><span class="title">API文档</span><!----></p>
                            <ul class="sidebar-links">
                                <!-- <li>
                                    <section class="sidebar-group">
                                        <button class="sidebar-heading clickable">
                                            <span class="title">自动化 - 控件操作</span>
                                            <span class="arrow down"></span>
                                        </button>
                                </li> -->
                                <li>
                                    <section class="sidebar-group"><button
                                            class="sidebar-heading clickable sidebar-link"><!----><span class="title">自动化 -
                                                控件操作</span><span class="arrow down"></span></button>
                                        <ul class="sidebar-links">
                                            <li><!--[--><a href="./automator/index.html"
                                                    class="router-link-active router-link-exact-active nav-link sidebar-link sidebar-page"
                                                    aria-label="入门介绍" aria-current="page"><!---->入门介绍<!----></a>
                                                <ul class="sidebar-sub-headers"></ul><!--]-->
                                            </li>
                                            <li><!--[--><a
                                                    href="./automator/selector.html"
                                                    class="nav-link sidebar-link sidebar-page"
                                                    aria-label="选择器"><!---->选择器<!----></a>
                                                <ul class="sidebar-sub-headers"></ul><!--]-->
                                            </li>
                                            <li><!--[--><a
                                                    href="./automator/uiobject.html"
                                                    class="nav-link sidebar-link sidebar-page"
                                                    aria-label="控件和控件集合"><!---->控件和控件集合<!----></a>
                                                <ul class="sidebar-sub-headers"></ul><!--]-->
                                            </li>
                                            <li><!--[--><a href="./automator/api.html"
                                                    class="nav-link sidebar-link sidebar-page"
                                                    aria-label="automator与其他函数"><!---->automator与其他函数<!----></a>
                                                <ul class="sidebar-sub-headers"></ul><!--]-->
                                            </li>
                                        </ul>
                                    </section>
                                </li>
                    <li><!--[--><a href="./coordinatesBasedAutomation.html"
                            class="router-link-active router-link-exact-active nav-link sidebar-link sidebar-page active"
                            aria-label="自动化 - 坐标操作" aria-current="page"><!---->自动化 - 坐标操作<!----></a>
                        <ul class="sidebar-sub-headers">
                            <li class="sidebar-sub-header"><a aria-current="page"
                                    href="./coordinatesBasedAutomation.html#setscreenmetrics-width-height"
                                    class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                    aria-label="setScreenMetrics(width, height)"><!---->setScreenMetrics(width,
                                    height)<!----></a>
                                <ul class="sidebar-sub-headers"></ul>
                            </li>
                            <li class="sidebar-sub-header"><a aria-current="page"
                                    href="./coordinatesBasedAutomation.html#%E5%AE%89%E5%8D%937-0%E4%BB%A5%E4%B8%8A%E7%9A%84%E8%A7%A6%E6%91%B8%E5%92%8C%E6%89%8B%E5%8A%BF%E6%A8%A1%E6%8B%9F"
                                    class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                    aria-label="安卓7.0以上的触摸和手势模拟"><!---->安卓7.0以上的触摸和手势模拟<!----></a>
                                <ul class="sidebar-sub-headers">
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#click-x-y"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="click(x, y)"><!---->click(x, y)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#longclick-x-y"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="longClick(x, y)"><!---->longClick(x, y)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#press-x-y-duration"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="press(x, y, duration)"><!---->press(x, y,
                                            duration)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#swipe-x1-y1-x2-y2-duration"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="swipe(x1, y1, x2, y2, duration)"><!---->swipe(x1,
                                            y1, x2, y2, duration)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#gesture-duration-x1-y1-x2-y2"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="gesture(duration, [x1, y1], [x2, y2], ...)"><!---->gesture(duration,
                                            [x1, y1], [x2, y2], ...)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#gestures-delay1-duration1-x1-y1-x2-y2-delay2-duration2-x3-y3-x4-y4"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="gestures([delay1, duration1, [x1, y1], [x2, y2], ...], [delay2, duration2, [x3, y3], [x4, y4], ...], ...)"><!---->gestures([delay1,
                                            duration1, [x1, y1], [x2, y2], ...], [delay2, duration2, [x3,
                                            y3], [x4, y4], ...], ...)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                </ul>
                            </li>
                            <li class="sidebar-sub-header"><a aria-current="page"
                                    href="./coordinatesBasedAutomation.html#%E4%BD%BF%E7%94%A8root%E6%9D%83%E9%99%90%E7%82%B9%E5%87%BB%E5%92%8C%E6%BB%91%E5%8A%A8%E7%9A%84%E7%AE%80%E5%8D%95%E5%91%BD%E4%BB%A4"
                                    class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                    aria-label="使用root权限点击和滑动的简单命令"><!---->使用root权限点击和滑动的简单命令<!----></a>
                                <ul class="sidebar-sub-headers">
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#tap-x-y"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="Tap(x, y)"><!---->Tap(x, y)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#swipe-x1-y1-x2-y2-duration-1"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="Swipe(x1, y1, x2, y2, [duration])"><!---->Swipe(x1,
                                            y1, x2, y2, [duration])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                </ul>
                            </li>
                            <li class="sidebar-sub-header"><a aria-current="page"
                                    href="./coordinatesBasedAutomation.html#rootautomator"
                                    class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                    aria-label="RootAutomator"><!---->RootAutomator<!----></a>
                                <ul class="sidebar-sub-headers">
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#new-rootautomator-options"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="new RootAutomator([options])"><!---->new
                                            RootAutomator([options])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-tap-x-y-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator.tap(x, y[, id])"><!---->RootAutomator.tap(x,
                                            y[, id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-swipe-x1-x2-y1-y2-duration-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator.swipe(x1, x2, y1, y2[, duration, id])"><!---->RootAutomator.swipe(x1,
                                            x2, y1, y2[, duration, id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-press-x-y-duration-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator.press(x, y, duration[, id])"><!---->RootAutomator.press(x,
                                            y, duration[, id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-longpress-x-y-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator.longPress(x, y[, id])"><!---->RootAutomator.longPress(x,
                                            y[, id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-touchdown-x-y-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator.touchDown(x, y[, id])"><!---->RootAutomator.touchDown(x,
                                            y[, id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-touchmove-x-y-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator.touchMove(x, y[, id])"><!---->RootAutomator.touchMove(x,
                                            y[, id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-touchup-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator.touchUp([id])"><!---->RootAutomator.touchUp([id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                </ul>
                            </li>
                            <li class="sidebar-sub-header"><a aria-current="page"
                                    href="./coordinatesBasedAutomation.html#rootautomator2"
                                    class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                    aria-label="RootAutomator2"><!---->RootAutomator2<!----></a>
                                <ul class="sidebar-sub-headers">
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#new-rootautomator2-options"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="new RootAutomator2([options])"><!---->new
                                            RootAutomator2([options])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-tap-x-y"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.tap(x, y)"><!---->RootAutomator2.tap(x,
                                            y)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-longpress-x-y"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.longPress(x, y)"><!---->RootAutomator2.longPress(x,
                                            y)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-press-x-y-duration"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.press(x, y, duration)"><!---->RootAutomator2.press(x,
                                            y, duration)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-swipe-x1-y1-x2-y2-duration"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.swipe(x1, y1, x2, y2, duration)"><!---->RootAutomator2.swipe(x1,
                                            y1, x2, y2, duration)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchdown-x-y-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.touchDown(x, y, [id])"><!---->RootAutomator2.touchDown(x,
                                            y, [id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchdown-pointers"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.touchDown(pointers)"><!---->RootAutomator2.touchDown(pointers)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchmove-x-y-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.touchMove(x, y, [id])"><!---->RootAutomator2.touchMove(x,
                                            y, [id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchmove-pointers"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.touchMove(pointers)"><!---->RootAutomator2.touchMove(pointers)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchup-id"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.touchUp([id])"><!---->RootAutomator2.touchUp([id])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchup-pointers"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.touchUp(pointers)"><!---->RootAutomator2.touchUp(pointers)<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-flush"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.flush()"><!---->RootAutomator2.flush()<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                    <li class="sidebar-sub-header"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-exit-forced"
                                            class="router-link-active router-link-exact-active nav-link sidebar-link heading"
                                            aria-label="RootAutomator2.exit([forced])"><!---->RootAutomator2.exit([forced])<!----></a>
                                        <ul class="sidebar-sub-headers"></ul>
                                    </li>
                                </ul>
                            </li>
                        </ul><!--]-->
                    </li>
                    <li><!--[--><a href="./app.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="app - 应用"><!---->app -
                            应用<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./base64.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="base64"><!---->base64<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./colors.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="colors - 颜色"><!---->colors - 颜色<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./canvas.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="canvas - 画布"><!---->canvas - 画布<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./console.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="console - 控制台"><!---->console - 控制台<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./crypto.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="crypto - 加解密与消息摘要"><!---->crypto - 加解密与消息摘要<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./debug.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="debug - 调试工具"><!---->debug - 调试工具<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./device.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="device - 设备"><!---->device - 设备<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./dialogs.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="dialogs - 对话框"><!---->dialogs - 对话框<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./engines.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="engines - 脚本引擎"><!---->engines - 脚本引擎<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./events.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="events - 事件与监听"><!---->events - 事件与监听<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./floaty.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="floaty - 悬浮窗"><!---->floaty - 悬浮窗<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./files.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="files - 文件系统"><!---->files - 文件系统<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./globals.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="globals - 全局变量与函数"><!---->globals - 全局变量与函数<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./http.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="http - HTTP网络请求"><!---->http - HTTP网络请求<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./images.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="images - 图片处理"><!---->images - 图片处理<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./keys.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="keys - 按键模拟"><!---->keys
                            - 按键模拟<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./media.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="media - 多媒体"><!---->media
                            - 多媒体<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./modules.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="module - 模块"><!---->module - 模块<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./ocr.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="ocr - 文字识别"><!---->ocr -
                            文字识别<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./plugins.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="plugins - 插件"><!---->plugins - 插件<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./powerManager.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="power_manager - 电源管理"><!---->power_manager - 电源管理<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./sensors.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="sensors - 传感器"><!---->sensors - 传感器<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./shell.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="shell - Shell命令"><!---->shell - Shell命令<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./storages.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="storages - 本地存储"><!---->storages - 本地存储<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./settings.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="settings - 设置"><!---->settings - 设置<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./threads.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="threads - 多线程"><!---->threads - 多线程<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./timers.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="timers - 定时器"><!---->timers - 定时器<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./timedTasks.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="work_manager - 定时与任务"><!---->work_manager - 定时与任务<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li>
                        <section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span
                                    class="title">ui -
                                    用户界面</span><span class="arrow right"></span></button><!----></section>
                    </li>
                    <li><!--[--><a href="./util.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="util - 工具"><!---->util -
                            工具<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./webSocket.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="WebSocket"><!---->WebSocket<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                    <li><!--[--><a href="./zip.html" class="nav-link sidebar-link sidebar-page"
                            aria-label="zip - 压缩与解压"><!---->zip -
                            压缩与解压<!----></a>
                        <ul class="sidebar-sub-headers"></ul><!--]-->
                    </li>
                </ul>
                </section>
                </li>
                <li>
                    <section class="sidebar-group">
                        <p class="sidebar-heading"><!----><span class="title">进阶</span><!----></p>
                        <ul class="sidebar-links">
                            <li><!--[--><a href="./scriptingJava.html" class="nav-link sidebar-link sidebar-page"
                                    aria-label="和Java交互"><!---->和Java交互<!----></a>
                                <ul class="sidebar-sub-headers"></ul><!--]-->
                            </li>
                        </ul>
                    </section>
                </li>
                </ul><!--[--><!----><!--]-->
            </aside><!--[-->
            <main class="page" id="main-content"><!---->
                <nav class="breadcrumb">
                    <ol vocab="https://schema.org/" typeof="BreadcrumbList">
                        <li class="" property="itemListElement" typeof="ListItem"><a href="https://pro.autojs.org/docs/"
                                class="" property="item" typeof="WebPage"><span
                                    class="icon iconfont icon-home"></span><span property="name">Auto.js Pro</span></a>
                            <meta property="position" content="1">
                        </li>
                        <li class="" property="itemListElement" typeof="ListItem"><a href="./" class="" property="item"
                                typeof="WebPage"><!----><span property="name">阅读须知</span></a>
                            <meta property="position" content="2">
                        </li>
                        <li class="is-active" property="itemListElement" typeof="ListItem"><a aria-current="page"
                                href="./coordinatesBasedAutomation.html"
                                class="router-link-active router-link-exact-active" property="item"
                                typeof="WebPage"><!----><span property="name">自动化 - 坐标操作</span></a>
                            <meta property="position" content="3">
                        </li>
                    </ol>
                </nav>
                <div class="page-title">
                    <h1><!---->自动化 - 坐标操作</h1>
                    <div class="page-info"><span class="date-info" aria-label="写作日期📅" data-balloon-pos="down"><svg
                                xmlns="http://www.w3.org/2000/svg" class="icon calendar-icon" viewBox="0 0 1024 1024"
                                fill="currentColor" aria-label="calendar icon">
                                <path
                                    d="M716.4 110.137c0-18.753-14.72-33.473-33.472-33.473-18.753 0-33.473 14.72-33.473 33.473v33.473h66.993v-33.473zm-334.87 0c0-18.753-14.72-33.473-33.473-33.473s-33.52 14.72-33.52 33.473v33.473h66.993v-33.473zm468.81 33.52H716.4v100.465c0 18.753-14.72 33.473-33.472 33.473a33.145 33.145 0 01-33.473-33.473V143.657H381.53v100.465c0 18.753-14.72 33.473-33.473 33.473a33.145 33.145 0 01-33.473-33.473V143.657H180.6A134.314 134.314 0 0046.66 277.595v535.756A134.314 134.314 0 00180.6 947.289h669.74a134.36 134.36 0 00133.94-133.938V277.595a134.314 134.314 0 00-133.94-133.938zm33.473 267.877H147.126a33.145 33.145 0 01-33.473-33.473c0-18.752 14.72-33.473 33.473-33.473h736.687c18.752 0 33.472 14.72 33.472 33.473a33.145 33.145 0 01-33.472 33.473z">
                                </path>
                            </svg><span>2022年10月22日</span>
                            <meta property="datePublished" content="2022-10-22T07:36:15.000Z">
                        </span></div>
                    <hr>
                </div>
                <div class="toc-place-holder">
                    <aside id="toc">
                        <div class="toc-header">此页内容</div>
                        <div class="toc-wrapper">
                            <ul class="toc-list">
                                <li class="toc-item"><a aria-current="page"
                                        href="./coordinatesBasedAutomation.html#setscreenmetrics-width-height"
                                        class="router-link-active router-link-exact-active toc-link level2">setScreenMetrics(width,
                                        height)</a></li><!---->
                                <li class="toc-item"><a aria-current="page"
                                        href="./coordinatesBasedAutomation.html#%E5%AE%89%E5%8D%937-0%E4%BB%A5%E4%B8%8A%E7%9A%84%E8%A7%A6%E6%91%B8%E5%92%8C%E6%89%8B%E5%8A%BF%E6%A8%A1%E6%8B%9F"
                                        class="router-link-active router-link-exact-active toc-link level2">安卓7.0以上的触摸和手势模拟</a>
                                </li>
                                <ul class="toc-list">
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#click-x-y"
                                            class="router-link-active router-link-exact-active toc-link level3">click(x,
                                            y)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#longclick-x-y"
                                            class="router-link-active router-link-exact-active toc-link level3">longClick(x,
                                            y)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#press-x-y-duration"
                                            class="router-link-active router-link-exact-active toc-link level3">press(x,
                                            y, duration)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#swipe-x1-y1-x2-y2-duration"
                                            class="router-link-active router-link-exact-active toc-link level3">swipe(x1,
                                            y1, x2, y2, duration)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#gesture-duration-x1-y1-x2-y2"
                                            class="router-link-active router-link-exact-active toc-link level3">gesture(duration,
                                            [x1, y1], [x2, y2], ...)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#gestures-delay1-duration1-x1-y1-x2-y2-delay2-duration2-x3-y3-x4-y4"
                                            class="router-link-active router-link-exact-active toc-link level3">gestures([delay1,
                                            duration1, [x1, y1], [x2, y2], ...], [delay2, duration2, [x3, y3], [x4, y4],
                                            ...], ...)</a></li><!---->
                                </ul>
                                <li class="toc-item"><a aria-current="page"
                                        href="./coordinatesBasedAutomation.html#%E4%BD%BF%E7%94%A8root%E6%9D%83%E9%99%90%E7%82%B9%E5%87%BB%E5%92%8C%E6%BB%91%E5%8A%A8%E7%9A%84%E7%AE%80%E5%8D%95%E5%91%BD%E4%BB%A4"
                                        class="router-link-active router-link-exact-active toc-link level2">使用root权限点击和滑动的简单命令</a>
                                </li>
                                <ul class="toc-list">
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#tap-x-y"
                                            class="router-link-active router-link-exact-active toc-link level3">Tap(x,
                                            y)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#swipe-x1-y1-x2-y2-duration-1"
                                            class="router-link-active router-link-exact-active toc-link level3">Swipe(x1,
                                            y1, x2, y2, [duration])</a></li><!---->
                                </ul>
                                <li class="toc-item"><a aria-current="page"
                                        href="./coordinatesBasedAutomation.html#rootautomator"
                                        class="router-link-active router-link-exact-active toc-link level2">RootAutomator</a>
                                </li>
                                <ul class="toc-list">
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#new-rootautomator-options"
                                            class="router-link-active router-link-exact-active toc-link level3">new
                                            RootAutomator([options])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-tap-x-y-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator.tap(x,
                                            y[, id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-swipe-x1-x2-y1-y2-duration-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator.swipe(x1,
                                            x2, y1, y2[, duration, id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-press-x-y-duration-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator.press(x,
                                            y, duration[, id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-longpress-x-y-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator.longPress(x,
                                            y[, id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-touchdown-x-y-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator.touchDown(x,
                                            y[, id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-touchmove-x-y-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator.touchMove(x,
                                            y[, id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator-touchup-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator.touchUp([id])</a>
                                    </li><!---->
                                </ul>
                                <li class="toc-item"><a aria-current="page"
                                        href="./coordinatesBasedAutomation.html#rootautomator2"
                                        class="router-link-active router-link-exact-active toc-link level2">RootAutomator2</a>
                                </li>
                                <ul class="toc-list">
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#new-rootautomator2-options"
                                            class="router-link-active router-link-exact-active toc-link level3">new
                                            RootAutomator2([options])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-tap-x-y"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.tap(x,
                                            y)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-longpress-x-y"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.longPress(x,
                                            y)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-press-x-y-duration"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.press(x,
                                            y, duration)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-swipe-x1-y1-x2-y2-duration"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.swipe(x1,
                                            y1, x2, y2, duration)</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchdown-x-y-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.touchDown(x,
                                            y, [id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchdown-pointers"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.touchDown(pointers)</a>
                                    </li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchmove-x-y-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.touchMove(x,
                                            y, [id])</a></li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchmove-pointers"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.touchMove(pointers)</a>
                                    </li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchup-id"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.touchUp([id])</a>
                                    </li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-touchup-pointers"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.touchUp(pointers)</a>
                                    </li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-flush"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.flush()</a>
                                    </li><!---->
                                    <li class="toc-item"><a aria-current="page"
                                            href="./coordinatesBasedAutomation.html#rootautomator2-exit-forced"
                                            class="router-link-active router-link-exact-active toc-link level3">RootAutomator2.exit([forced])</a>
                                    </li><!---->
                                </ul>
                            </ul>
                        </div>
                    </aside>
                </div><!---->
                <div class="theme-hope-content">
                    <h1 id="自动化-坐标操作" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E8%87%AA%E5%8A%A8%E5%8C%96-%E5%9D%90%E6%A0%87%E6%93%8D%E4%BD%9C"
                            aria-hidden="true">#</a> 自动化 - 坐标操作</h1>
                    <blockquote>
                        <p>Stability: 2 - Stable</p>
                    </blockquote>
                    <p>本章节介绍了一些使用坐标进行点击、滑动的函数。这些函数有的需要安卓7.0以上，有的需要root权限。</p>
                    <p>要获取要点击的位置的坐标，可以在开发者选项中开启"指针位置"。</p>
                    <p>基于坐标的脚本通常会有分辨率的问题，这时可以通过<code><span class="token function">setScreenMetrics</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>函数来进行自动坐标放缩。这个函数会影响本章节的所有点击、长按、滑动等函数。通过设定脚本设计时的分辨率，使得脚本在其他分辨率下自动放缩坐标。
                    </p>
                    <p>控件和坐标也可以相互结合。一些控件是无法点击的(clickable为false),
                        无法通过<code><span class="token punctuation">.</span><span class="token function">click</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>函数来点击，这时如果安卓版本在7.0以上或者有root权限，就可以通过以下方式来点击：
                    </p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token comment">//获取这个控件</span>
<span class="token keyword">var</span> widget <span class="token operator">=</span> <span class="token function">id</span><span class="token punctuation">(</span><span class="token string">"xxx"</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">findOne</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//获取其中心位置并点击</span>
<span class="token function">click</span><span class="token punctuation">(</span>widget<span class="token punctuation">.</span><span class="token function">bounds</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">centerX</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> widget<span class="token punctuation">.</span><span class="token function">bounds</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">centerY</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//如果用root权限则用Tap</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="setscreenmetrics-width-height" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#setscreenmetrics-width-height"
                            aria-hidden="true">#</a> setScreenMetrics(width, height)</h2>
                    <ul>
                        <li><code><span class="token property">width</span></code> {number} 屏幕宽度，单位像素</li>
                        <li><code><span class="token property">height</span></code> {number} 屏幕高度，单位像素</li>
                    </ul>
                    <p>设置脚本坐标点击所适合的屏幕宽高。如果脚本运行时，屏幕宽度不一致会自动放缩坐标。</p>
                    <p>例如在1920*1080的设备中，某个操作的代码为</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token function">setScreenMetrics</span><span class="token punctuation">(</span><span class="token number">1080</span><span class="token punctuation">,</span> <span class="token number">1920</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">click</span><span class="token punctuation">(</span><span class="token number">800</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">longClick</span><span class="token punctuation">(</span><span class="token number">300</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>那么在其他设备上AutoJs会自动放缩坐标以便脚本仍然有效。例如在540 *
                        960的屏幕中<code><span class="token function">click</span><span class="token punctuation">(</span><span class="token number">800</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">)</span></code>实际上会点击位置(400,
                        100)。</p>
                    <h2 id="安卓7-0以上的触摸和手势模拟" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%AE%89%E5%8D%937-0%E4%BB%A5%E4%B8%8A%E7%9A%84%E8%A7%A6%E6%91%B8%E5%92%8C%E6%89%8B%E5%8A%BF%E6%A8%A1%E6%8B%9F"
                            aria-hidden="true">#</a> 安卓7.0以上的触摸和手势模拟</h2>
                    <blockquote>
                        <p>Stability: 2 - Stable</p>
                    </blockquote>
                    <p><strong>注意以下命令只有Android7.0及以上才有效</strong></p>
                    <h3 id="click-x-y" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#click-x-y" aria-hidden="true">#</a> click(x, y)</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 要点击的坐标的x值</li>
                        <li><code><span class="token property">y</span></code> {number} 要点击的坐标的y值</li>
                    </ul>
                    <p>模拟点击坐标(x, y)，并返回是否点击成功。只有在点击执行完成后脚本才继续执行。</p>
                    <p>一般而言，只有点击过程(大约150毫秒)中被其他事件中断(例如用户自行点击)才会点击失败。</p>
                    <p>使用该函数模拟连续点击时可能有点击速度过慢的问题，这时可以用<code><span class="token function">press</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>函数代替。
                    </p>
                    <h3 id="longclick-x-y" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#longclick-x-y" aria-hidden="true">#</a> longClick(x,
                        y)</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 要长按的坐标的x值</li>
                        <li><code><span class="token property">y</span></code> {number} 要长按的坐标的y值</li>
                    </ul>
                    <p>模拟长按坐标(x, y), 并返回是否成功。只有在长按执行完成（大约600毫秒）时脚本才会继续执行。</p>
                    <p>一般而言，只有长按过程中被其他事件中断(例如用户自行点击)才会长按失败。</p>
                    <h3 id="press-x-y-duration" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#press-x-y-duration" aria-hidden="true">#</a>
                        press(x, y, duration)</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 要按住的坐标的x值</li>
                        <li><code><span class="token property">y</span></code> {number} 要按住的坐标的y值</li>
                        <li><code><span class="token property">duration</span></code> {number} 按住时长，单位毫秒</li>
                    </ul>
                    <p>模拟按住坐标(x, y), 并返回是否成功。只有按住操作执行完成时脚本才会继续执行。</p>
                    <p>如果按住时间过短，那么会被系统认为是点击；如果时长超过500毫秒，则认为是长按。</p>
                    <p>一般而言，只有按住过程中被其他事件中断才会操作失败。</p>
                    <p>一个连点器的例子如下：</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token comment">//循环100次</span>
<span class="token keyword">for</span><span class="token punctuation">(</span><span class="token keyword">var</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> <span class="token number">100</span><span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
  <span class="token comment">//点击位置(500, 1000), 每次用时1毫秒</span>
  <span class="token function">press</span><span class="token punctuation">(</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">1000</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h3 id="swipe-x1-y1-x2-y2-duration" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#swipe-x1-y1-x2-y2-duration" aria-hidden="true">#</a>
                        swipe(x1, y1, x2, y2, duration)</h3>
                    <ul>
                        <li><code><span class="token property">x1</span></code> {number} 滑动的起始坐标的x值</li>
                        <li><code><span class="token property">y1</span></code> {number} 滑动的起始坐标的y值</li>
                        <li><code><span class="token property">x2</span></code> {number} 滑动的结束坐标的x值</li>
                        <li><code><span class="token property">y2</span></code> {number} 滑动的结束坐标的y值</li>
                        <li><code><span class="token property">duration</span></code> {number} 滑动时长，单位毫秒</li>
                    </ul>
                    <p>模拟从坐标(x1, y1)滑动到坐标(x2, y2)，并返回是否成功。只有滑动操作执行完成时脚本才会继续执行。</p>
                    <p>一般而言，只有滑动过程中被其他事件中断才会滑动失败。</p>
                    <h3 id="gesture-duration-x1-y1-x2-y2" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#gesture-duration-x1-y1-x2-y2"
                            aria-hidden="true">#</a> gesture(duration, [x1, y1], [x2, y2], ...)</h3>
                    <ul>
                        <li><code><span class="token property">duration</span></code> {number} 手势的时长</li>
                        <li><code><span class="token punctuation">[</span>x<span class="token punctuation">,</span> y<span class="token punctuation">]</span></code>
                            {...} 手势滑动路径的一系列坐标</li>
                    </ul>
                    <p>模拟手势操作。例如<code><span class="token function">gesture</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">1000</span><span class="token punctuation">]</span><span class="token punctuation">)</span></code>为模拟一个从(0,
                        0)到(500, 500)到(500, 100)的手势操作，时长为2秒。</p>
                    <h3 id="gestures-delay1-duration1-x1-y1-x2-y2-delay2-duration2-x3-y3-x4-y4" tabindex="-1"><a
                            class="header-anchor"
                            href="./coordinatesBasedAutomation.html#gestures-delay1-duration1-x1-y1-x2-y2-delay2-duration2-x3-y3-x4-y4"
                            aria-hidden="true">#</a> gestures([delay1, duration1, [x1, y1], [x2, y2], ...], [delay2,
                        duration2, [x3, y3], [x4, y4], ...], ...)</h3>
                    <p>同时模拟多个手势。每个手势的参数为[delay, duration, 坐标],
                        delay为延迟多久(毫秒)才执行该手势；duration为手势执行时长；坐标为手势经过的点的坐标。其中delay参数可以省略，默认为0。</p>
                    <p>例如手指捏合：</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token function">gestures</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">800</span><span class="token punctuation">,</span> <span class="token number">300</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">1000</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
         <span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">300</span><span class="token punctuation">,</span> <span class="token number">1500</span><span class="token punctuation">]</span><span class="token punctuation">,</span> <span class="token punctuation">[</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">1000</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h2 id="使用root权限点击和滑动的简单命令" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E4%BD%BF%E7%94%A8root%E6%9D%83%E9%99%90%E7%82%B9%E5%87%BB%E5%92%8C%E6%BB%91%E5%8A%A8%E7%9A%84%E7%AE%80%E5%8D%95%E5%91%BD%E4%BB%A4"
                            aria-hidden="true">#</a> 使用root权限点击和滑动的简单命令</h2>
                    <blockquote>
                        <p>Stability: 1 - Experimental</p>
                    </blockquote>
                    <p>注意：本章节的函数在后续版本很可能有改动！请勿过分依赖本章节函数的副作用。推荐使用<code><span class="token property">RootAutomator</span></code>代替本章节的触摸函数。
                    </p>
                    <p>以下函数均需要root权限，可以实现任意位置的点击、滑动等。</p>
                    <ul>
                        <li>这些函数通常首字母大写以表示其特殊的权限。</li>
                        <li>这些函数均不返回任何值。</li>
                        <li>并且，这些函数的执行是异步的、非阻塞的，在不同机型上所用的时间不同。脚本不会等待动作执行完成才继续执行。因此最好在每个函数之后加上适当的sleep来达到期望的效果。</li>
                    </ul>
                    <p>例如:</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token function">Tap</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">,</span> <span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">sleep</span><span class="token punctuation">(</span><span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>注意，动作的执行可能无法被停止，例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token keyword">for</span><span class="token punctuation">(</span><span class="token keyword">var</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> <span class="token number">100</span><span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
  <span class="token function">Tap</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">,</span> <span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>这段代码执行后可能会出现在任务管理中停止脚本后点击仍然继续的情况。 因此，强烈建议在每个动作后加上延时：</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token keyword">for</span><span class="token punctuation">(</span><span class="token keyword">var</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> <span class="token number">100</span><span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
  <span class="token function">Tap</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">,</span> <span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token function">sleep</span><span class="token punctuation">(</span><span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h3 id="tap-x-y" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#tap-x-y" aria-hidden="true">#</a> Tap(x, y)</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 要点击的x坐标</li>
                        <li><code><span class="token property">y</span></code> {number} 要点击的y坐标</li>
                    </ul>
                    <p>点击位置(x, y), 您可以通过"开发者选项"开启指针位置来确定点击坐标。</p>
                    <h3 id="swipe-x1-y1-x2-y2-duration-1" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#swipe-x1-y1-x2-y2-duration-1"
                            aria-hidden="true">#</a> Swipe(x1, y1, x2, y2, [duration])</h3>
                    <ul>
                        <li><code><span class="token property">x1</span></code> {number} 滑动起点的x坐标</li>
                        <li><code><span class="token property">y1</span></code> {number} 滑动起点的y坐标</li>
                        <li><code><span class="token property">x2</span></code> {number} 滑动终点的x坐标</li>
                        <li><code><span class="token property">y2</span></code> {number} 滑动终点的y坐标</li>
                        <li><code><span class="token property">duration</span></code> {number} 滑动动作所用的时间</li>
                    </ul>
                    <p>滑动。从(x1, y1)位置滑动到(x2, y2)位置。</p>
                    <h2 id="rootautomator" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator" aria-hidden="true">#</a>
                        RootAutomator</h2>
                    <blockquote>
                        <p>Stability: 2 - Stable</p>
                    </blockquote>
                    <p>RootAutomator是一个使用root权限来模拟触摸的对象，用它可以完成触摸与多点触摸，并且这些动作的执行没有延迟。</p>
                    <p>一个脚本中最好只存在一个RootAutomator，并且保证脚本结束退出他。可以在exit事件中退出RootAutomator，例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token keyword">var</span> ra <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">RootAutomator</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
events<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'exit'</span><span class="token punctuation">,</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
  ra<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//执行一些点击操作</span>
<span class="token operator">...</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <div class="custom-container warning">
                        <p class="custom-container-title">注意</p>
                        <p>RootAutomator需要root权限或adb权限才能执行，要使用adb权限可以用<code>shell<span class="token punctuation">.</span><span class="token function">setDefaultOptions</span><span class="token punctuation">(</span><span class="token punctuation">{</span><span class="token literal-property property">adb</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">}</span><span class="token punctuation">)</span></code>默认使用adb权限，需要shizuku授权。
                        </p>
                        <p>另外RootAutomoat兼容性不佳，从9.3版本开始，推荐使用<a
                                href="./coordinatesBasedAutomation.html#rootautomator2">RootAutomator2</a>代替。
                        </p>
                    </div>
                    <h3 id="new-rootautomator-options" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#new-rootautomator-options" aria-hidden="true">#</a>
                        new RootAutomator([options])</h3>
                    <ul>
                        <li><code><span class="token property">options</span></code> {object} 可选参数，包括: <ul>
                                <li><code><span class="token property">adb</span></code> {boolean}
                                    是否使用adb权限，默认为false。若为<code><span class="token boolean">true</span></code>时，需要用shizuku授权才能使用。
                                </li>
                                <li><code><span class="token property">inputDevice</span></code> {string}
                                    指定RootAutomator操作的设备，比如<code><span class="token operator">/</span>dev<span class="token operator">/</span>input<span class="token operator">/</span>event4</code>。不指定则自动检测。
                                </li>
                            </ul>
                        </li>
                    </ul>
                    <p>构造一个RootAutomator。</p>
                    <h3 id="rootautomator-tap-x-y-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator-tap-x-y-id" aria-hidden="true">#</a>
                        RootAutomator.tap(x, y[, id])</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 横坐标</li>
                        <li><code><span class="token property">y</span></code> {number} 纵坐标</li>
                        <li><code><span class="token property">id</span></code> {number}
                            多点触摸id，可选，默认为1，可以通过setDefaultId指定。</li>
                    </ul>
                    <p>点击位置(x, y)。其中id是一个整数值，用于区分多点触摸，不同的id表示不同的"手指"，例如：</p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token keyword">var</span> ra <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">RootAutomator</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//让"手指1"点击位置(100, 100)</span>
ra<span class="token punctuation">.</span><span class="token function">tap</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">,</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//让"手指2"点击位置(200, 200);</span>
ra<span class="token punctuation">.</span><span class="token function">tap</span><span class="token punctuation">(</span><span class="token number">200</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
ra<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <p>如果不需要多点触摸，则不需要id这个参数。 多点触摸通常用于手势或游戏操作，例如模拟双指捏合、双指上滑等。</p>
                    <p>某些情况下可能存在tap点击无反应的情况，这时可以用<code>RootAutomator<span class="token punctuation">.</span><span class="token function">press</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>函数代替。
                    </p>
                    <h3 id="rootautomator-swipe-x1-x2-y1-y2-duration-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator-swipe-x1-x2-y1-y2-duration-id"
                            aria-hidden="true">#</a> RootAutomator.swipe(x1, x2, y1, y2[, duration, id])</h3>
                    <ul>
                        <li><code><span class="token property">x1</span></code> {number} 滑动起点横坐标</li>
                        <li><code><span class="token property">y1</span></code> {number} 滑动起点纵坐标</li>
                        <li><code><span class="token property">x2</span></code> {number} 滑动终点横坐标</li>
                        <li><code><span class="token property">y2</span></code> {number} 滑动终点纵坐标</li>
                        <li><code><span class="token property">duration</span></code> {number} 滑动时长，单位毫秒，默认值为300</li>
                        <li><code><span class="token property">id</span></code> {number} 多点触摸id，可选，默认为1</li>
                    </ul>
                    <p>模拟一次从(x1, y1)到(x2, y2)的时间为duration毫秒的滑动。</p>
                    <h3 id="rootautomator-press-x-y-duration-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator-press-x-y-duration-id"
                            aria-hidden="true">#</a> RootAutomator.press(x, y, duration[, id])</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 横坐标</li>
                        <li><code><span class="token property">y</span></code> {number} 纵坐标</li>
                        <li><code><span class="token property">duration</span></code> {number} 按下时长</li>
                        <li><code><span class="token property">id</span></code> {number} 多点触摸id，可选，默认为1</li>
                    </ul>
                    <p>模拟按下位置(x, y)，时长为duration毫秒。</p>
                    <h3 id="rootautomator-longpress-x-y-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator-longpress-x-y-id"
                            aria-hidden="true">#</a> RootAutomator.longPress(x, y[, id])</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 横坐标</li>
                        <li><code><span class="token property">y</span></code> {number} 纵坐标</li>
                        <li><code><span class="token property">duration</span></code> {number} 按下时长</li>
                        <li><code><span class="token property">id</span></code> {number} 多点触摸id，可选，默认为1</li>
                    </ul>
                    <p>模拟长按位置(x, y)。</p>
                    <p>以上为简单模拟触摸操作的函数。如果要模拟一些复杂的手势，需要更底层的函数。</p>
                    <h3 id="rootautomator-touchdown-x-y-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator-touchdown-x-y-id"
                            aria-hidden="true">#</a> RootAutomator.touchDown(x, y[, id])</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 横坐标</li>
                        <li><code><span class="token property">y</span></code> {number} 纵坐标</li>
                        <li><code><span class="token property">id</span></code> {number} 多点触摸id，可选，默认为1</li>
                    </ul>
                    <p>模拟手指按下位置(x, y)。</p>
                    <h3 id="rootautomator-touchmove-x-y-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator-touchmove-x-y-id"
                            aria-hidden="true">#</a> RootAutomator.touchMove(x, y[, id])</h3>
                    <ul>
                        <li><code><span class="token property">x</span></code> {number} 横坐标</li>
                        <li><code><span class="token property">y</span></code> {number} 纵坐标</li>
                        <li><code><span class="token property">id</span></code> {number} 多点触摸id，可选，默认为1</li>
                    </ul>
                    <p>模拟移动手指到位置(x, y)。</p>
                    <h3 id="rootautomator-touchup-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator-touchup-id" aria-hidden="true">#</a>
                        RootAutomator.touchUp([id])</h3>
                    <ul>
                        <li><code><span class="token property">id</span></code> {number} 多点触摸id，可选，默认为1</li>
                    </ul>
                    <p>模拟手指弹起。</p>
                    <h2 id="rootautomator2" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2" aria-hidden="true">#</a>
                        RootAutomator2</h2>
                    <p>RootAutomator2用于基于root或者adb权限，模拟点击、手势、长按等操作。相比起基于无障碍的操作，RootAutomator支持多点触控和动态改变手势；相比RootAutomator，RootAutomator2的兼容性更佳。
                    </p>
                    <div class="language-javascript ext-js line-numbers-mode"><button class="copy" aria-label="复制代码"
                            data-copied="已复制" data-balloon-pos="left">
                            <div class="copy-icon"></div>
                        </button>
                        <pre class="language-javascript" copy-code-registered=""><code><span class="token keyword">let</span> screenWidth <span class="token operator">=</span> $device<span class="token punctuation">.</span>width<span class="token punctuation">;</span>
<span class="token keyword">let</span> screenHeight <span class="token operator">=</span> $device<span class="token punctuation">.</span>height<span class="token punctuation">;</span>

<span class="token comment">// 使用root权限执行。也可以指定为{adb: true}使用adb权限，需要shizuku授权</span>
<span class="token keyword">const</span> ra <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">RootAutomator2</span><span class="token punctuation">(</span><span class="token punctuation">{</span> <span class="token literal-property property">root</span><span class="token operator">:</span> <span class="token boolean">true</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 点击(200, 200)的位置</span>
ra<span class="token punctuation">.</span><span class="token function">tap</span><span class="token punctuation">(</span><span class="token number">200</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">sleep</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 按住屏幕中点持续500毫秒</span>
ra<span class="token punctuation">.</span><span class="token function">press</span><span class="token punctuation">(</span>screenWidth <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">,</span> screenHeight <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">sleep</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 从(500, 200)滑动到(500, 1000)，滑动时长300毫秒</span>
ra<span class="token punctuation">.</span><span class="token function">swipe</span><span class="token punctuation">(</span><span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">,</span> <span class="token number">1000</span><span class="token punctuation">,</span> <span class="token number">300</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">sleep</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>


<span class="token comment">// 双指捏合</span>
<span class="token comment">// 左上角位置</span>
<span class="token keyword">let</span> p0 <span class="token operator">=</span> <span class="token punctuation">{</span>
    <span class="token literal-property property">x</span><span class="token operator">:</span> screenWidth <span class="token operator">/</span> <span class="token number">6</span><span class="token punctuation">,</span>
    <span class="token literal-property property">y</span><span class="token operator">:</span> screenHeight <span class="token operator">/</span> <span class="token number">6</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token comment">// 右下角位置</span>
<span class="token keyword">let</span> p1 <span class="token operator">=</span> <span class="token punctuation">{</span>
    <span class="token literal-property property">x</span><span class="token operator">:</span> screenWidth <span class="token operator">-</span> p0<span class="token punctuation">.</span>x<span class="token punctuation">,</span>
    <span class="token literal-property property">y</span><span class="token operator">:</span> screenHeight <span class="token operator">-</span> p0<span class="token punctuation">.</span>y<span class="token punctuation">,</span>
<span class="token punctuation">}</span>
<span class="token comment">// 同时按下左上角和右下角，手指id为0和1</span>
ra<span class="token punctuation">.</span><span class="token function">touchDown</span><span class="token punctuation">(</span><span class="token punctuation">[</span>
    <span class="token punctuation">{</span> <span class="token literal-property property">x</span><span class="token operator">:</span> p0<span class="token punctuation">.</span>x<span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> p0<span class="token punctuation">.</span>y<span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">0</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">{</span> <span class="token literal-property property">x</span><span class="token operator">:</span> p1<span class="token punctuation">.</span>x<span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> p1<span class="token punctuation">.</span>y<span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 移动步数</span>
<span class="token keyword">const</span> steps <span class="token operator">=</span> <span class="token number">20</span><span class="token punctuation">;</span>
<span class="token comment">// 计算每一步移动的偏移量</span>
<span class="token keyword">const</span> stepX <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span><span class="token punctuation">(</span>p1<span class="token punctuation">.</span>x <span class="token operator">-</span> p0<span class="token punctuation">.</span>x<span class="token punctuation">)</span> <span class="token operator">/</span> steps<span class="token punctuation">)</span> <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> stepY <span class="token operator">=</span> Math<span class="token punctuation">.</span><span class="token function">round</span><span class="token punctuation">(</span><span class="token punctuation">(</span>p1<span class="token punctuation">.</span>y <span class="token operator">-</span> p0<span class="token punctuation">.</span>y<span class="token punctuation">)</span> <span class="token operator">/</span> steps<span class="token punctuation">)</span> <span class="token operator">/</span> <span class="token number">2</span><span class="token punctuation">;</span>
<span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">let</span> i <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> i <span class="token operator">&lt;</span> steps<span class="token punctuation">;</span> i<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token comment">// 手指0向右下移动，手指1向左上移动</span>
    ra<span class="token punctuation">.</span><span class="token function">touchMove</span><span class="token punctuation">(</span><span class="token punctuation">[</span>
        <span class="token punctuation">{</span> <span class="token literal-property property">x</span><span class="token operator">:</span> p0<span class="token punctuation">.</span>x <span class="token operator">+</span> stepX <span class="token operator">*</span> i<span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> p0<span class="token punctuation">.</span>y <span class="token operator">+</span> stepY <span class="token operator">*</span> i<span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">0</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>
        <span class="token punctuation">{</span> <span class="token literal-property property">x</span><span class="token operator">:</span> p1<span class="token punctuation">.</span>x <span class="token operator">-</span> stepX <span class="token operator">*</span> i<span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> p1<span class="token punctuation">.</span>y <span class="token operator">-</span> stepY <span class="token operator">*</span> i<span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">1</span> <span class="token punctuation">}</span>
    <span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token comment">// 弹起所有手指</span>
ra<span class="token punctuation">.</span><span class="token function">touchUp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// 等待前面的操作全部完成</span>
ra<span class="token punctuation">.</span><span class="token function">flush</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// 退出RootAutomator，如果没有正确退出，可能导致"手指"残留在屏幕上</span>
ra<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
                        <div class="line-numbers" aria-hidden="true">
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                            <div class="line-number"></div>
                        </div>
                    </div>
                    <h3 id="new-rootautomator2-options" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#new-rootautomator2-options" aria-hidden="true">#</a>
                        new
                        RootAutomator2([<code><span class="token property">options</span></code>])</h3>
                    <ul>
                        <li><code><span class="token property">options</span></code> 创建RootAutomator2的选项，可选。 <ul>
                                <li><code><span class="token property">adb</span></code> {boolean} 是否使用adb权限，默认为`false
                                </li>
                                <li><code><span class="token property">root</span></code> {boolean}
                                    是否使用root权限，当不指定adb权限时，默认为<code><span class="token boolean">true</span></code></li>
                            </ul>
                        </li>
                    </ul>
                    <p>根据选项创建一个新的RootAutomator2实例。RootAutomator2相比RootAutomator有更好的兼容性。</p>
                    <p>可以指定是否使用root权限、adb权限等，参见ShellOptions。如果不指定root或adb权限，则默认使用root权限。</p>
                    <h3 id="rootautomator2-tap-x-y" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-tap-x-y" aria-hidden="true">#</a>
                        RootAutomator2.tap(<code><span class="token property">x</span></code>,
                        <code><span class="token property">y</span></code>)
                    </h3>
                    <p>点击位置(x,
                        y)，时长为5毫秒。此函数会等待操作同步完成，可能函数执行时间大于实际操作时间，若对执行时间有要求，可以用<code><span class="token property">touchDown</span></code>,
                        <code><span class="token property">touchUp</span></code>等异步方法代替。
                    </p>
                    <h4 id="参数" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0" aria-hidden="true">#</a> 参数</h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">x</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">y</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-longpress-x-y" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-longpress-x-y"
                            aria-hidden="true">#</a>
                        RootAutomator2.longPress(<code><span class="token property">x</span></code>,
                        <code><span class="token property">y</span></code>)
                    </h3>
                    <p>长按(x, y)位置。长按的时长为<a
                            href="https://developer.android.google.cn/reference/android/view/ViewConfiguration.html#getLongPressTimeout()"
                            target="_blank" rel="noopener noreferrer">ViewConfiguration.getLongPressTimeout()<span><svg
                                    class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"
                                    focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15">
                                    <path fill="currentColor"
                                        d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z">
                                    </path>
                                    <polygon fill="currentColor"
                                        points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9">
                                    </polygon>
                                </svg><span class="external-link-icon-sr-only">open in new
                                    window</span></span></a>+100毫秒。此函数会等待操作同步完成，可能函数执行时间大于实际操作时间，若对执行时间有要求，可以用<code><span class="token property">touchDown</span></code>,
                        <code><span class="token property">touchUp</span></code>等异步方法代替。
                    </p>
                    <h4 id="参数-1" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-1" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">x</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">y</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-press-x-y-duration" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-press-x-y-duration"
                            aria-hidden="true">#</a>
                        RootAutomator2.press(<code><span class="token property">x</span></code>,
                        <code><span class="token property">y</span></code>,
                        <code><span class="token property">duration</span></code>)
                    </h3>
                    <p>按下(x,
                        y)位置持续duration时长，然后抬起手指。此函数会等待操作同步完成，可能函数执行时间大于实际操作时间，若对执行时间有要求，可以用<code><span class="token property">touchDown</span></code>,
                        <code><span class="token property">touchUp</span></code>等异步方法代替。
                    </p>
                    <h4 id="参数-2" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-2" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">x</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">y</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">duration</span></code>
                                </td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">按下时长，单位毫秒</td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-swipe-x1-y1-x2-y2-duration" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-swipe-x1-y1-x2-y2-duration"
                            aria-hidden="true">#</a>
                        RootAutomator2.swipe(<code><span class="token property">x1</span></code>,
                        <code><span class="token property">y1</span></code>,
                        <code><span class="token property">x2</span></code>,
                        <code><span class="token property">y2</span></code>,
                        <code><span class="token property">duration</span></code>)
                    </h3>
                    <p>在给定的duration时长从(x1, y1)位置滑动到(x2,
                        y2)位置。此函数会等待操作同步完成，可能函数执行时间大于实际操作时间，若对执行时间有要求，可以用<code><span class="token property">touchDown</span></code>,
                        <code><span class="token property">touchUp</span></code>等异步方法代替。
                    </p>
                    <h4 id="参数-3" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-3" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">x1</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">y1</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">x2</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">y2</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">duration</span></code>
                                </td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">滑动时长，单位毫秒</td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-touchdown-x-y-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-touchdown-x-y-id"
                            aria-hidden="true">#</a>
                        RootAutomator2.touchDown(<code><span class="token property">x</span></code>,
                        <code><span class="token property">y</span></code>,
                        [<code><span class="token property">id</span></code>])
                    </h3>
                    <p>按下(x,
                        y)位置。若对应id的手指之前已经是按下状态，则会模拟手指移动(touchMove)事件。此操作是异步进行的，若要等待操作完成，可以使用<code><span class="token property">flush</span></code>方法。
                    </p>
                    <h4 id="参数-4" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-4" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">x</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">y</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">id</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">手指ID，默认为0</td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-touchdown-pointers" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-touchdown-pointers"
                            aria-hidden="true">#</a>
                        RootAutomator2.touchDown(<code><span class="token property">pointers</span></code>)</h3>
                    <p>模拟一个手指按下事件，使用数组描述触摸的位置和相应的手指id。例如<code>ra<span class="token punctuation">.</span><span class="token function">touchDown</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token punctuation">{</span><span class="token literal-property property">x</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">x</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">)</span></code>会使用手指0按下位置(100,
                        100)，使用手指1按下位置(200,
                        200)。此操作是异步进行的，若要等待操作完成，可以使用<code><span class="token property">flush</span></code>方法。</p>
                    <h4 id="参数-5" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-5" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">pointers</span></code>
                                </td>
                                <td style="text-align:left;"><code><span class="token property">Array</span></code></td>
                                <td style="text-align:left;">
                                    描述每个手指位置的数组，数组的每个元素带有<code><span class="token property">x</span></code>,
                                    <code><span class="token property">y</span></code>和<code><span class="token property">id</span></code>三个字段
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-touchmove-x-y-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-touchmove-x-y-id"
                            aria-hidden="true">#</a>
                        RootAutomator2.touchMove(<code><span class="token property">x</span></code>,
                        <code><span class="token property">y</span></code>,
                        [<code><span class="token property">id</span></code>])
                    </h3>
                    <p>将手指移动到(x,
                        y)位置。若对应id的手指之前并非按下状态，则会模拟手指按下(touchDown)事件。此操作是异步进行的，若要等待操作完成，可以使用<code><span class="token property">flush</span></code>方法。
                    </p>
                    <h4 id="参数-6" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-6" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">x</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">y</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">-</td>
                            </tr>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">id</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">手指ID，默认为0</td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-touchmove-pointers" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-touchmove-pointers"
                            aria-hidden="true">#</a>
                        RootAutomator2.touchMove(<code><span class="token property">pointers</span></code>)</h3>
                    <p>模拟一个手指移动事件，使用数组描述触摸的位置和相应的手指id。例如<code>ra<span class="token punctuation">.</span><span class="token function">touchMove</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token punctuation">{</span><span class="token literal-property property">x</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">x</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">)</span></code>会将手指0移动到位置(100,
                        100)，将手指1移动到位置(200,
                        200)。此操作是异步进行的，若要等待操作完成，可以使用<code><span class="token property">flush</span></code>方法。</p>
                    <h4 id="参数-7" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-7" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">pointers</span></code>
                                </td>
                                <td style="text-align:left;"><code><span class="token property">Array</span></code></td>
                                <td style="text-align:left;">
                                    描述每个手指位置的数组，数组的每个元素带有<code><span class="token property">x</span></code>,
                                    <code><span class="token property">y</span></code>和<code><span class="token property">id</span></code>三个字段
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-touchup-id" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-touchup-id" aria-hidden="true">#</a>
                        RootAutomator2.touchUp([<code><span class="token property">id</span></code>])</h3>
                    <p>抬起手指。</p>
                    <h4 id="参数-8" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-8" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">id</span></code></td>
                                <td style="text-align:left;"><code><span class="token property">number</span></code>
                                </td>
                                <td style="text-align:left;">手指ID，若不指定则抬起所有手指</td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-touchup-pointers" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-touchup-pointers"
                            aria-hidden="true">#</a>
                        RootAutomator2.touchUp(<code><span class="token property">pointers</span></code>)</h3>
                    <p>模拟一个手指抬起事件，使用数组描述触摸的位置和相应的手指id。例如<code>ra<span class="token punctuation">.</span><span class="token function">touchUp</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token punctuation">{</span><span class="token literal-property property">x</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span><span class="token literal-property property">x</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token literal-property property">y</span><span class="token operator">:</span> <span class="token number">200</span><span class="token punctuation">,</span> <span class="token literal-property property">id</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">)</span></code>会使用手指0和手指1抬起，其中的坐标位置为手指抬起时的位置。此操作是异步进行的，若要等待操作完成，可以使用<code><span class="token property">flush</span></code>方法。
                    </p>
                    <h4 id="参数-9" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-9" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">pointers</span></code>
                                </td>
                                <td style="text-align:left;"><code><span class="token property">Array</span></code></td>
                                <td style="text-align:left;">
                                    描述每个手指位置的数组，数组的每个元素带有<code><span class="token property">x</span></code>,
                                    <code><span class="token property">y</span></code>和<code><span class="token property">id</span></code>三个字段
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <h3 id="rootautomator2-flush" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-flush" aria-hidden="true">#</a>
                        RootAutomator2.flush()</h3>
                    <p>等待所有操作完成。例如我们使用<code><span class="token property">tocuhDown</span></code>,
                        <code><span class="token property">touchMove</span></code>,
                        <code><span class="token property">touchUp</span></code>完成了一系列手势，需要等待这些手势完成后继续下一步时，使用<code>ra<span class="token punctuation">.</span><span class="token function">flush</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code>来等待这些操作完成。
                    </p>
                    <h3 id="rootautomator2-exit-forced" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#rootautomator2-exit-forced" aria-hidden="true">#</a>
                        RootAutomator2.exit([<code><span class="token property">forced</span></code>])</h3>
                    <p>退出RootAutomator2。</p>
                    <h4 id="参数-10" tabindex="-1"><a class="header-anchor"
                            href="./coordinatesBasedAutomation.html#%E5%8F%82%E6%95%B0-10" aria-hidden="true">#</a> 参数
                    </h4>
                    <table>
                        <thead>
                            <tr>
                                <th style="text-align:left;">名称</th>
                                <th style="text-align:left;">类型</th>
                                <th style="text-align:left;">描述</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td style="text-align:left;"><code><span class="token property">forced</span></code>
                                </td>
                                <td style="text-align:left;"><code><span class="token property">boolean</span></code>
                                </td>
                                <td style="text-align:left;">可选。如果为true，将不等待未完成的操作，而是尽可能快地退出；如果为false，在会所有未完成的操作结束后退出进程。
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div><!---->
                <footer class="page-meta"><!---->
                    <div class="meta-item update-time"><span class="label">上次编辑于: </span><span class="info">2022/11/20
                            17:30:01</span></div>
                    <div class="meta-item contributors"><span class="label">贡献者: </span><span class="contributor"
                            title="email: 946994919@qq.com">hyb1996</span></div>
                </footer>
                <nav class="page-nav"><!----><a href="./app.html" class="nav-link next" aria-label="app - 应用">
                        <div class="hint">下一页<span class="arrow right"></span></div>
                        <div class="link">app - 应用<!----></div>
                    </a></nav><!----><!---->
            </main><!--]--><!----><!--]-->
        </div><!--]--><button class="back-to-top" aria-label="返回顶部" data-balloon-pos="left"><svg
                xmlns="http://www.w3.org/2000/svg" class="icon back-to-top-icon" viewBox="0 0 1024 1024"
                fill="currentColor" aria-label="back-to-top icon">
                <path
                    d="M512 843.2c-36.2 0-66.4-13.6-85.8-21.8-10.8-4.6-22.6 3.6-21.8 15.2l7 102c.4 6.2 7.6 9.4 12.6 5.6l29-22c3.6-2.8 9-1.8 11.4 2l41 64.2c3 4.8 10.2 4.8 13.2 0l41-64.2c2.4-3.8 7.8-4.8 11.4-2l29 22c5 3.8 12.2.6 12.6-5.6l7-102c.8-11.6-11-20-21.8-15.2-19.6 8.2-49.6 21.8-85.8 21.8z">
                </path>
                <path
                    d="m795.4 586.2-96-98.2C699.4 172 513 32 513 32S324.8 172 324.8 488l-96 98.2c-3.6 3.6-5.2 9-4.4 14.2L261.2 824c1.8 11.4 14.2 17 23.6 10.8L419 744s41.4 40 94.2 40c52.8 0 92.2-40 92.2-40l134.2 90.8c9.2 6.2 21.6.6 23.6-10.8l37-223.8c.4-5.2-1.2-10.4-4.8-14zM513 384c-34 0-61.4-28.6-61.4-64s27.6-64 61.4-64c34 0 61.4 28.6 61.4 64S547 384 513 384z">
                </path>
            </svg></button><button class="sw-update-popup" tabindex="0">新内容已就绪<span class="icon-wrapper"><svg
                    xmlns="http://www.w3.org/2000/svg" class="icon update-icon" viewBox="0 0 1024 1024"
                    fill="currentColor" aria-label="update icon">
                    <path
                        d="M949.949 146.25v255.826c0 21.981-13.989 35.97-35.97 35.97H658.154c-13.988 0-25.983-7.992-33.973-21.981-5.997-13.989-4-27.977 7.991-39.97l79.942-77.946c-55.954-51.973-121.918-77.955-199.863-77.955-37.975 0-75.95 8.002-113.924 21.99-37.975 15.985-67.948 37.976-91.934 63.957-25.982 23.987-47.973 53.96-63.957 91.934-29.983 73.955-29.983 153.895 0 227.85 15.984 37.976 37.975 67.947 63.957 91.934 23.986 25.982 53.959 47.973 91.934 63.956 37.974 13.989 75.95 21.991 113.924 21.991 45.967 0 87.942-9.998 127.913-29.982 41.976-17.99 75.951-45.967 101.931-83.943 7.993-4 11.994-5.995 13.989-5.995 5.997 0 9.998 1.994 13.988 5.995l77.958 77.946c3.989 4 5.986 7.993 5.986 11.994 0 1.994-1.996 5.995-3.99 11.994-43.973 51.962-93.941 91.934-151.9 117.914-53.958 25.983-115.92 39.972-185.874 39.972-61.961 0-119.921-11.984-169.89-33.973-57.96-25.985-105.923-57.963-139.896-93.943-35.98-33.972-67.958-81.936-93.94-139.897-45.967-101.93-45.967-237.846 0-339.777 25.982-57.96 57.96-105.923 93.94-139.896 33.973-35.98 81.936-67.958 139.896-93.94 49.968-21.99 107.928-33.974 169.89-33.974 55.963 0 109.923 9.988 161.885 29.973 53.97 21.99 101.933 51.963 139.908 89.938l73.954-73.944c9.987-9.998 23.987-13.988 39.971-8.002 13.988 8.002 21.98 19.995 21.98 33.984z">
                    </path>
                </svg></span></button><!--]-->
    </div>
    <script type="module" src="./自动化 - 坐标操作 _ Auto.js Pro文档_files/app.486b1949.js.下载" defer=""></script>


    <div id="message-container"></div>
</body>
<div id="photoShowViewer" class="sb_BingCA photoShow" style="transition: all 0.2s ease-out 0s; opacity: 0;">
    <div class="photoshow-viewer-shadow" style="transition: all 0.2s ease-out 0s;"></div>
    <div class="photoshow-img-wrapper">
        <img>
        <div class="photoshow-view-mode-switch-tip">a</div>
    </div>
    <i class="photoshow-img-size"></i>
</div>

</html>